﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;


namespace Miao.Stand
{
    //[Obsolete("不能用这个类，因为verb中有一项为确定目标是否被选中，而发起攻击时替身并不会被选中。而且可能用这个必须要可选中目标")]
    //已补丁该类
    public class StandVerbAbility : StandAbility
    {
        public StandVerbAbility(StandPawn stand) : base(stand)
        {

        }
        public override void Init()
        {
            base.Init();
            InitVerb(stand);
        }
        public Verb_StandUseAbility verb;//verb的实例
        //要注意ImplementOwnerType定义在近战类中，而这需要走tool一类的设定
        private void InitVerb(StandPawn pawn)
        {
            verb = (Verb_StandUseAbility)Activator.CreateInstance(def.verb.verbClass);
            verb.caster = pawn;
            verb.verbProps = def.verb;
        }

        public override void Tick()
        {
            base.Tick();
            verb.VerbTick();
        }
    }

}
